<%-- 
    Document   : ProductEditing
    Created on : Nov 22, 2012, 5:07:16 PM
    Author     : vupttse
--%>

<%@page import="ass.data.ProductDAL"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <%
            String productId = request.getParameter("productId");
            String productName = request.getParameter("productName");
            String categoryId = request.getParameter("categoryId");
            float unitPrice = Float.parseFloat(request.getParameter("unitPrice"));
            int unitsInStock = Integer.parseInt(request.getParameter("unitsInStock"));
            int unitsInOrder = 0;
            String productImage = request.getParameter("productImage");
            String description = request.getParameter("description");
            ProductDAL.modifyProduct(productId, productName, categoryId, unitPrice, unitsInStock, unitsInOrder, productImage, description);
            response.sendRedirect("ManageProducts.jsp");
        %>
    </body>
</html>
